package models

import (
	"github.com/goravel/framework/database/orm"
)

type KillLog struct {
	orm.Model
	//    操作时间
	ActionTime string `gorm:"column:action_time;type:datetime(3);not null;comment:'操作时间'" form:"action_time" json:"action_time"`
	//    击杀者
	KillerName    string `gorm:"column:killer_name;type:varchar(255);not null;comment:'击杀者名'" form:"killer_name" json:"killer_name"`
	KillerSteamid string `gorm:"column:killer_steamid;type:varchar(255);not null;comment:'击杀者steamid'" form:"killer_steamid" json:"killer_steamid"`
	//击杀类型
	KillType string `gorm:"column:kill_type;type:varchar(255);null;comment:'击杀类型'" form:"kill_type" json:"kill_type"`
	//    被击杀者
	VictimName    string `gorm:"column:victim_name;type:varchar(255);not null;comment:'被击杀者名'" form:"victim_name" json:"victim_name"`
	VictimSteamid string `gorm:"column:victim_steamid;type:varchar(255);not null;comment:'被击杀者steamid'" form:"victim_steamid" json:"victim_steamid"`
	//    武器类型
	WeaponType string `gorm:"column:weapon_type;type:varchar(255);null;comment:'武器类型'" form:"weapon_type" json:"weapon_type"`
	Weapon     string `gorm:"column:weapon;type:varchar(255);null;comment:'武器'" form:"weapon" json:"weapon"`
	//    距离
	Distance string `gorm:"column:distance;type:varchar(255);null;comment:'距离'" form:"distance" json:"distance"`
	//    活动击杀
	Activity bool `gorm:"column:activity;type:varchar(255);null;comment:'活动'" form:"activity" json:"activity"`
	//    受害区域
	VictimArea string `gorm:"column:victim_area;type:varchar(255);null;comment:'受害区域'" form:"victim_area" json:"victim_area"`
	//    杀手区域
	KillerArea string `gorm:"column:killer_area;type:varchar(255);null;comment:'杀手区域'" form:"killer_area" json:"killer_area"`
	//    受害坐标
	VictimPosition string `gorm:"column:victim_position;type:varchar(255);null;comment:'受害坐标'" form:"victim_position" json:"victim_position"`
	//    杀手坐标
	KillerPosition  string         `gorm:"column:killer_position;type:varchar(255);null;comment:'杀手坐标'" form:"killer_position" json:"killer_position"`
	OriginalText    string         `gorm:"column:original_text;type:text;not null;comment:'原文'" json:"original_text"`
	ConfigurationID int            `gorm:"column:configuration_id;type:int;null" form:"configuration_id" json:"configuration_id"`
	Configuration   *Configuration `gorm:"foreignkey:ConfigurationID" form:"-" json:"-"`
}

func (*KillLog) TableName() string {
	return "killlogs"
}
